<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
    <meta content=always name=referrer>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/base.css">
    <script src="__STATIC__/js/jquery-1.8.2.js"></script>
    <title>热门市场</title>
    <script>
        $(function(){
            $(".tablist li").click(
                    function(){
                        var a=$(".tablist li").index(this);
                        $(this).addClass("cur");
                        $(this).siblings().removeClass("cur");
                        $(".tabcon>div").eq(a).css({display:"block"});
                        $(".tabcon>div").eq(a).siblings().css({display:"none"});
                    }
            )
        })
    </script>
</head>
<body>
<div class="wrap-ppj">
    <div class="header">
        <p style="font-size: 16px;">热门市场</p>
        <img src="__STATIC__/img_user/back.png" class="back" onclick=window.location.href="{:url('mobile/user_port/index')}">
    </div>
    <div class="center">
        <ul class="main">
            {volist name="bigPic" id="v"}
                <a {if condition="$v.skip_type eq 'url'"} href="{$v.linkUrl}" {else/} {if condition="$v.skip_type eq 'shop'"} href="javascript:jump_shop({$v.linkUrl});" {else/} href="javascript:jump_goods_details({$v.linkUrl});" {/if}{/if}>
                <img src="__STATIC__/img_user/pic.png" style="width: 100%;" >
                </a>
            {/volist}
        </ul>
        <ul class="type">
            {volist name="type_list" id='v'}
            <li><a href="javascript:market_cate({$v.id});"><img src="/{$v.picUrl}" style="height: 80px;" onerror="this.src='/static/mobile/img/empty_img.png'"><br><span>{$v.title}</span></a></li>
            {/volist}
        </ul>

    </div>
</div>
<script>
    //跳转到店铺
    function jump_shop(id) {
        var url = "{:url('mobile/user_category/shop_index')}?shop_id="+id;
        sessionStorage.setItem('url_back',window.location.href);
        window.location.href = url;
    }

    function market_cate(id) {
        sessionStorage.setItem('market_cate',window.location.href);
        window.location.href = "{:url('mobile/user_action/market_category')}?type_id="+id;
    }

    //跳转到商品详情
    function jump_goods_details(id){
        sessionStorage.setItem('goods_url_back',window.location.href);
        window.location.href = "{:url('mobile/user_category/goods_details')}?goods_id="+id;
    }
</script>
</body>
</html>